package com.ys.erp.stage_user_service.bean.condition;

import com.ys.erp.entity.data.bean.CatMoneyPupGear;
import com.ys.erp.framework.annotation.valid.EnumsValid;
import com.ys.erp.framework.annotation.valid.MoneyValid;
import com.ys.erp.framework.condition.BasePageCondition;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author lwj
 * @date 2025/5/16
 */
@Data
public class UserMoneyCondition {

    @EqualsAndHashCode(callSuper = true)
    @Schema(description = "分页充值幺币记录请求对象")
    @Data
    public static class PageInCatMoneyRecordCon extends BasePageCondition {

        @Schema(description = "用户id")
        private Long userId;

        @Schema(description = "挡位")
        private String periodMoney;

        @Schema(description = "起始充值时间")
        private String startPayDate;

        @Schema(description = "结束充值时间")
        private String endPayDate;

        @Schema(description = "店铺编码")
        private String shopCode;

        @Schema(description = "充值方式")
        private String giftType;

    }

    @Data
    @Schema(description = "新增或更新幺币配置请求对象")
    public static class AddOrUpDateInMoneySettingCon {

        @Schema(description = "id")
        private Long id;

        @Schema(description = "关联文案提示")
        private String text;

        @Schema(description = "充值金额")
        @MoneyValid
        @NotBlank
        private String payMoney;

        @Schema(description = "赠送金额")
        @MoneyValid
        private String giftMoney;

        @Schema(description = "是否禁用")
        @NotNull
        @Min(0)
        @Max(1)
        private Integer isDisable;

        @Schema(description = "赠送类型，null:无赠送，YS_MONEY:赠送幺币,YS_PULSE:赠送幺豆")
        @EnumsValid(enumClass = CatMoneyPupGear.class)
        private String giftType;

    }

}
